<template>
  <div>
    <el-dropdown>
      <i class="el-icon-setting" style="margin-right: 15px;font-size: 25px"></i>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click.native="returnLogin()">退出</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <span style="font-size: 25px">账号:{{username}}</span>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: ""
    };
  },
  methods: {
    returnLogin() {
      this.$router.replace({ path: "/" });
    }
  },
  mounted() {
    this.username = sessionStorage.getItem("username");
  }
};
</script>

<style>
</style>